<?php
include('include/config.inc.php');
if(!isset($_SESSION['s_activId'.$cfgPack])
  || (isset($_SESSION['s_userType'.$cfgPack]) && isset($cfgFileNames['party'][$_SESSION['s_userType'.$cfgPack]]) 
      && $cfgFileNames['party'][$_SESSION['s_userType'.$cfgPack]] == 0))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
else
{
  
  $subCategoryId   = "";
  $subCategoryName = "";
  
  $selectCategary= "SELECT subcategory.subCategoryId,subcategory.subCategoryName
                      FROM subcategory
                      JOIN category
                     WHERE category.categoryId = '".$_GET['categoryId']."'
                       AND subcategory.categoryId = category.categoryId";
  $categaryResult = mysql_query($selectCategary);
  $d = 0;
  while($categoryRow = mysql_fetch_array($categaryResult))
  {
    $subCategoryId[$d]   = $categoryRow['subCategoryId'];
    $subCategoryName[$d] = $categoryRow['subCategoryName'];
    $d++;
  }  
  
  include("./bottom.php");
  $smarty->assign("subCategoryId",$subCategoryId);
  $smarty->assign("subCategoryName",$subCategoryName);
  $smarty->display("newInstallCatogaryAj.tpl");
}
?>
  